#ifndef ALIBEEEP_h
	#define ALIBEEEP_h
	
	#include <Arduino.h>
	#include <EEPROM.h>

	#define VERSION "B1-11/11/2013"
	#define VER_START_BYTE 0
	#define VER_NUM_BYTES  12

	// to reset password, set these two to desired value.  5 bytes per each uid and pwd.
	#define DEFAULT_UID ""
	#define DEFAULT_PWD ""

	// total of 5 bytes
	#define UID_START_BYTE 20
	#define UID_NUM_BYTES  4

	// total of 5 bytes
	#define PWD_START_BYTE 30
	#define PWD_NUM_BYTES  4


	class ALIBEEEP{
	public:
		ALIBEEEP();
		String getVersion();
		bool setUIDPWD(String OLDUID, String OLDPWD, String NEWUID, String NEWPWD);
		unsigned long logIn(String UID, String PWD);
		unsigned long logOut();
		unsigned long getSessionID();

	private:
		String _getUID();
		String _getPWD();
		bool _setVersion();
	
		String _readBytesToString(int startByte, int numberOfBytes);
		void _writeBytesFromString(int startByte, String valueToWrite);

		unsigned long _sessionID;
	};
#endif